<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>

    let t = null;

    let i = 0;

    document.onmousemove = function(){

        if( t === null ){
            t = setTimeout(function(){
                i++;
                console.log(i);

                t = null;
            }, 100);
        }
    }

    
</script>
</html>